package br.enovar.com;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

public class FuncionarioDAO extends DAO<Funcionario>{

	public FuncionarioDAO(Session session) {
		super(session, Funcionario.class);
	}
	
	public List<Funcionario> buscaFuncionario(String nome){
		Criteria c = session.createCriteria(Funcionario.class);
		c.add(Restrictions.ilike("nome", nome));
		return c.list();
	}

}
